Options +FollowSymlinks
RewriteEngine On
RewriteOptions MaxRedirects=10
#RewrieBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.*)/download/([0-9]+)/(.*)/([0-9]+).html$ index.php?page=download&id=$2&resize=$4 [NC,L]
RewriteRule ^(.*)/([a-zA-Z0-9]+)/([0-9]+)/(.*)/([0-9]+).html$ index.php?page=$2&id=$3&onpage=$5 [NC,L]
RewriteRule ^(.*)/([a-zA-Z0-9]+)/([0-9]+)/(.*).html$ index.php?page=$2&id=$3 [NC,L]
RewriteRule ^(.*)/([a-zA-Z0-9]+)/([0-9]+).html$ index.php?page=$2&onpage=$3 [NC,L]
RewriteRule ^(.*)/([a-zA-Z0-9]+).html$ index.php?page=$2 [NC,L]